﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QLZJFurnitureSCM.DAL;
using QLZJFurnitureSCM.Model;
using System.Data;

namespace QLZJFurnitureSCM.BLL
{
    public class PurchaseService
    {
        private IBaseDAO<Purchase> baseDAO = new PurchaseDAO();
        private IPurchaseDAO purchaseDAO = new PurchaseDAO();

        public Purchase InsertPurchase(Purchase purchase)
        {
            return baseDAO.Create(purchase);
        }

        public DataTable ReadAllPurchaseInDataTable(bool desc)
        {
            return purchaseDAO.ReadInDataTable(desc);
        }

        public List<Purchase> FindAll()
        {
            return baseDAO.ReadAll();
        }

        //进货单不应该提供更新和删除.
    }
}
